---
import { BaseLayout } from '../layouts';
import { RegisterContent } from '../components/sections';
import {
  SITE_BASE_URL,
  VIEWPORT_NO_ZOOM,
  REGISTER_PAGE_PATH,
  PAGE_TITLES,
  REGISTER_DESCRIPTION
} from '../constants';
import '../styles/components/register.css';
import { getCurrentLang } from '../utils';

const langDefault = getCurrentLang();
const langKey = langDefault.startsWith('zh') ? 'zh' : 'en';
const titleZh = PAGE_TITLES.REGISTER_ZH;
const titleEn = PAGE_TITLES.REGISTER_EN;
const title = langKey === 'zh' ? titleZh : titleEn;
Astro.response.headers.set('Cache-Control', 'no-store');
---

<BaseLayout
  lang={langDefault}
  titleZh={titleZh}
  titleEn={titleEn}
  title={title}
  description={REGISTER_DESCRIPTION}
  viewport={VIEWPORT_NO_ZOOM}
  canonical={`${SITE_BASE_URL}${REGISTER_PAGE_PATH}/`}
  metaRobots="noindex, nofollow"
>
  <Fragment slot="head">
    <meta name="referrer" content="same-origin" />
  </Fragment>
  <RegisterContent client:load />
</BaseLayout>
